
package com.jf.cloud.live.service.impl;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.live.mapper.LiveRoomBackMapper;
import com.jf.cloud.live.model.LiveRoomBack;
import com.jf.cloud.live.service.LiveRoomBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 直播回放
 *
 * @author zz
 * @date 2022-08-17 17:09:06
 */
@Service
public class LiveRoomBackServiceImpl implements LiveRoomBackService {

    @Autowired
    private LiveRoomBackMapper liveRoomBackMapper;

    @Override
    public PageVO<LiveRoomBack> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> liveRoomBackMapper.list());
    }

    @Override
    public LiveRoomBack getByBackId(Long backId) {
        return liveRoomBackMapper.getByBackId(backId);
    }

    @Override
    public void save(LiveRoomBack liveRoomBack) {
        liveRoomBackMapper.save(liveRoomBack);
    }

    @Override
    public void update(LiveRoomBack liveRoomBack) {
        liveRoomBackMapper.update(liveRoomBack);
    }

    @Override
    public void deleteById(Long backId) {
        liveRoomBackMapper.deleteById(backId);
    }
}
